<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模板语法</title>
    <script type="text/javascript"  src="../js/vue.js">
    </script>
</head>

<body>
    <div id="root">
        <h1>插值语法</h1>
        <h3>hello,{{name}}</h3>
        <hr/> <!-- 用来定义一条水平线  -->
        <h1>指令语法</h1>
        <a v-bind:href="url">点我去目的地 {{name1}}</a> 
        <br/>
        <a :href="url">点我去目的地啦  {{name1.toUpperCase()}}</a>
        <br/>
        <a :href = 'school.url'>点我去 {{school.name}}</a>
    </div>
</body>

<script type="text/javascript">
    Vue.config.productionTip = false

    new Vue({
        el:'#root',
        data:{
            name:'jack',
            name1:'baidu',
            url:'https://www.baidu.com/',
            school:{
                name:'TsingHua',
                url:'https://www.tsinghua.edu.cn/'
            }
        }
    }
    )

</script>
</html>